ga.view
Class MTIEvaluator

java.lang.Object
  extended by com.jme3.app.Application
      extended by com.jme3.app.SimpleApplication
          extended by ga.view.MTIEvaluator
All Implemented Interfaces:
com.jme3.system.SystemListener, MenuListener

public class MTIEvaluator
extends com.jme3.app.SimpleApplication
implements MenuListener

Main class of furny. This provides a menu to select GA configurations and handles all the work.

It should be renamed for future use.

Since:
12.08.2012
Author:
Stephan Dreyer

Nested Class Summary
private  class MTIEvaluator.EscapeListener
          Keyboard listener to catch the ESCAPE event.
private  class MTIEvaluator.StatisticsListener
          Keyboard listener to toggle statistics.
 
Field Summary
private  GASettings actSettings
           
private  com.jme3.app.state.AppState actState
           
private static java.util.logging.Logger LOGGER
           
private  MenuState menu
           
private  boolean showStatistics
           
private  ViewSettings viewSettings
           
private  java.io.File viewSettingsFile
           
private  java.lang.String viewSettingsFileName
           
 
Fields inherited from class com.jme3.app.SimpleApplication
flyCam, fpsText, guiFont, guiNode, INPUT_MAPPING_CAMERA_POS, INPUT_MAPPING_EXIT, INPUT_MAPPING_HIDE_STATS, INPUT_MAPPING_MEMORY, rootNode, showSettings
 
Fields inherited from class com.jme3.app.Application
assetManager, audioRenderer, cam, context, guiViewPort, inputEnabled, inputManager, joyInput, keyInput, listener, mouseInput, paused, pauseOnFocus, renderer, renderManager, settings, speed, stateManager, timer, touchInput, viewPort
 
Constructor Summary
MTIEvaluator(java.io.File viewSettingsFile)
          Creates a new evaluation menu and loads the settings from the given file.
MTIEvaluator(java.lang.String viewSettingsFileName)
          Creates a new evaluation menu and loads the settings from the given file.
 
Method Summary
 void backToMenu()
          Callback when a state is exited.
static void main(java.lang.String[] args)
          Main method to test the evaluator.
 void modelSelected(java.lang.String name)
          Callback when a model has been selected.
 void nextState()
          Callback when the next state should be attached.
private  void setAndActivate(com.jme3.app.state.AppState newState)
          Attaches a new app state and enables it.
 void setShowStatistics(boolean showStatistics)
          Toggles the statistics display.
 void simpleInitApp()
           
 void simpleUpdate(float tpf)
           
 
Methods inherited from class com.jme3.app.SimpleApplication
getFlyByCamera, getGuiNode, getRootNode, initialize, isShowSettings, loadGuiFont, setDisplayFps, setDisplayStatView, setShowSettings, simpleRender, start, update
 
Methods inherited from class com.jme3.app.Application
createCanvas, destroy, destroyInput, enqueue, gainFocus, getAssetManager, getAudioRenderer, getCamera, getContext, getGuiViewPort, getInputManager, getListener, getRenderer, getRenderManager, getStateManager, getTimer, getViewPort, handleError, isPauseOnLostFocus, loseFocus, requestClose, reshape, restart, runQueuedTasks, setAssetManager, setPauseOnLostFocus, setSettings, setTimer, start, startCanvas, startCanvas, stop, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

private static final java.util.logging.Logger LOGGER

showStatistics

private boolean showStatistics

menu

private MenuState menu

viewSettingsFileName

private final java.lang.String viewSettingsFileName

viewSettingsFile

private final java.io.File viewSettingsFile

viewSettings

private ViewSettings viewSettings

actSettings

private GASettings actSettings

actState

private com.jme3.app.state.AppState actState
Constructor Detail

MTIEvaluator

public MTIEvaluator(java.lang.String viewSettingsFileName)
Creates a new evaluation menu and loads the settings from the given file.

Parameters:
viewSettingsFileName - The name of the xml file to load.
Since:
12.08.2012

MTIEvaluator

public MTIEvaluator(java.io.File viewSettingsFile)
Creates a new evaluation menu and loads the settings from the given file.

Parameters:
viewSettingsFile - The xml file to load.
Since:
12.08.2012
Method Detail

simpleInitApp

public void simpleInitApp()
Specified by:
simpleInitApp in class com.jme3.app.SimpleApplication

modelSelected

public void modelSelected(java.lang.String name)
Description copied from interface: MenuListener
Callback when a model has been selected.

Specified by:
modelSelected in interface MenuListener
Parameters:
name - Name of the model, must be unique.

nextState

public void nextState()
Description copied from interface: MenuListener
Callback when the next state should be attached.

Specified by:
nextState in interface MenuListener

setAndActivate

private void setAndActivate(com.jme3.app.state.AppState newState)
Attaches a new app state and enables it.

Parameters:
newState - The new app state.
Since:
12.08.2012

backToMenu

public void backToMenu()
Description copied from interface: MenuListener
Callback when a state is exited.

Specified by:
backToMenu in interface MenuListener

simpleUpdate

public void simpleUpdate(float tpf)
Overrides:
simpleUpdate in class com.jme3.app.SimpleApplication

setShowStatistics

public void setShowStatistics(boolean showStatistics)
Toggles the statistics display.

Parameters:
showStatistics - Show statistics if true.
Since:
12.08.2012

main

public static void main(java.lang.String[] args)
Main method to test the evaluator.

Parameters:
args - No arguments required.
Since:
12.08.2012